package cn.ibizlab.util.adapter.config;

import cn.ibizlab.util.adapter.security.DefaultAdapterMethodSecurityExpressionHandler;
import cn.ibizlab.util.helper.UniqueNameGenerator;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler;

@Configuration
@ComponentScan(basePackages = {"net.ibizsys.central.cloud.core.spring","net.ibizsys.central.plugin.mybatisplus.spring"})
@MapperScan(value={"net.ibizsys.central.plugin.mybatisplus.spring"},nameGenerator = UniqueNameGenerator.class)
public class AdapterAutoConfiguration {

    @Bean(name = "AdapterMethodSecurityExpressionHandler")
    public MethodSecurityExpressionHandler AdapterMethodSecurityExpressionHandler(){
        return new DefaultAdapterMethodSecurityExpressionHandler();
    }

}
